import axios from 'axios'
// import config from './config.js'
function orderList(){
  return new Promise(
    function(resolve,reject){
      axios.get("/ordering/list").then(result=>{
        resolve(result.data)
      })
  })
}

// 查询订单
function searchOrder(order_num){
  return new Promise(
    function(resolve,reject){
      axios.get(`/ordering/search/${order_num}`).then(result=>{
        resolve(result.data)
      })
  })
}
// 删除订单
function deleteOrder(id){
  return new Promise(function(resolve,reject){
    axios.delete(`/ordering/del/${id}`).then(result=>resolve(result.data))
  })
  
}
export {
  orderList,
  searchOrder,
  deleteOrder
}